#include "Clean.h"

extern void LoadImageNotifyRoutine(
    IN OPTIONAL PUNICODE_STRING FullImageName,
    IN HANDLE ProcessId,
    IN PIMAGE_INFO ImageInfo
);

VOID DriverUnload(IN PDRIVER_OBJECT lpDriverObject)
{
    UNREFERENCED_PARAMETER(lpDriverObject);

    //PsRemoveLoadImageNotifyRoutine(LoadImageNotifyRoutine);

    FreeControlDeviceObject();
}

void FreeControlDeviceObject()
{
    UNICODE_STRING usWin32Name = { 0 };

    if (DrvGlobals.lpDeviceObject)
        IoDeleteDevice(DrvGlobals.lpDeviceObject);

    RtlInitUnicodeString(&usWin32Name, USTRING_SYMBOL_NAME);
    IoDeleteSymbolicLink(&usWin32Name);
}